package bdhub.littletail.app.config;

/**
 * Created by FreddyChen on 16/2/23.
 * chenshichao@outlook.com
 */
public class NetworkConfig {

    public static final String SERVER_BASE_URL = "xxx";

    public static final String PARAM_COMMON_ERROR_CODE = "errorCode";
    public static final String PARAM_COMMON_ERROR_MESSAGE = "errorMsg";
    public static final String PARAM_COMMON_RESPONSE_DATA = "data";

    public static final String VALUE_COMMON_TRUE = "Y";
    public static final String VALUE_COMMON_FALSE = "N";

    // == 帐户 ==
    public static final String PARAM_ACCOUNT_UID = "uid";
    public static final String PARAM_ACCOUNT_PHONE_NUMBER = "phone";
    public static final String PARAM_ACCOUNT_TOKEN = "token";
    public static final String PARAM_ACCOUNT_NICKNAME = "nick";
    public static final String PARAM_ACCOUNT_GENDER = "sex";
    public static final String VALUE_ACCOUNT_GENDER_MALE = "M";
    public static final String VALUE_ACCOUNT_GENDER_FEMALE = "F";
    public static final String PARAM_ACCOUNT_BIRTHDAY = "bir";
    public static final String PARAM_ACCOUNT_PROVINCE = "pro";
    public static final String PARAM_ACCOUNT_CITY = "city";
    public static final String PARAM_ACCOUNT_SIGN = "sign";
    public static final String PARAM_ACCOUNT_AVATAR = "icon";
    public static final String PARAM_ACCOUNT_OPENACC = "openAcc";
    public static final String PARAM_ACCOUNT_WECHAT = "weixin";
    public static final String PARAM_ACCOUNT_QQ = "qq";
    public static final String PARAM_ACCOUNT_WEIBO = "weibo";
    public static final String PARAM_ACCOUNT_ALBUM = "albums";
    public static final String PARAM_ACCOUNT_BACKGROUND_IMAGE = "bg";
    public static final String PARAM_ACCOUNT_PHOTO_ID = "id";
    public static final String PARAM_ACCOUNT_PHOTO_URL = "url";
    public static final String PARAM_ACCOUNT_IS_FRIEND = "isFriend";
    public static final String PARAM_ACCOUNT_FRIEND_TYPE = "friendType";
    public static final int VALUE_ACCOUNT_FRIEND_TYPE_FRIEND = 0;
    public static final int VALUE_ACCOUNT_FRIEND_TYPE_FOLLOWED = 1;
    public static final int VALUE_ACCOUNT_FRIEND_TYPE_STRANGER = -1;
    public static final int VALUE_ACCOUNT_FRIEND_TYPE_BLACK = -2;
    public static final String PARAM_ACCOUNT_TOPICS_FOLLOWED = "follows";
    public static final String PARAM_ACCOUNT_CURRENT_TOPIC = "currentTname";
    public static final String PARAM_ACCOUNT_LAST_TOPIC = "lastTname";
    public static final String PARAM_ACCOUNT_CURRENT_TOPIC_ID = "currentTid";
    public static final String PARAM_ACCOUNT_LAST_TOPIC_ID = "lastTid";
    public static final String PARAM_ACCOUNT_CURRENT_ROOM_ID = "crid";
    public static final String PARAM_ACCOUNT_CURRENT_ROOM_NAME = "crName";

    public static boolean getLocalBoolean(String value) {
        return null != value && value.equals(VALUE_COMMON_TRUE);
    }

    public static String getServerBoolean(Boolean value) {
        return value ? NetworkConfig.VALUE_COMMON_TRUE
                : NetworkConfig.VALUE_COMMON_FALSE;
    }
}
